From 23578b68fe6afbda4796b3b91eb22e077e201c74 Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 1 Jul 2006 22:46:55 +0000 Subject: [PATCH] Magproto: c89 fix. Makefile.in: untangle windows executable build somewhat --- Makefile.in | 30 ++++++++++++++---------------- magproto.c | 3 ++- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Makefile.in b/Makefile.in index aee46dc63..e8163eeed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -162,33 +162,38 @@ WINFILES = gpsbabel.exe mingw/libexpat.dll win32/GPSBabelGUI.exe win32/gui-2/REA # in and tagged. # release-sourcecheck: - cvs commit +#rjl cvs commit ./chkdoc make clean rm -fr gpsbabel-$(VERSIOND) - make gpsbabel doc gpsbabel.html +#rjl make gpsbabel doc gpsbabel.html @(. tools/functions && ask "Enter 'y' to tag the tree." "y") && cvs tag -F gpsbabel_$(VERSIONU) ; exit 0 - cvs export -r gpsbabel_$(VERSIONU) -d /tmp/gpsbabel-$(VERSIOND) gpsbabel - touch /tmp/gpsbabel-$(VERSIOND)/internal_styles.c + cvs export -r gpsbabel_$(VERSIONU) -d gpsbabel-$(VERSIOND) gpsbabel + touch gpsbabel-$(VERSIOND)/internal_styles.c # # Build the release tarball from the exported CVS tree, tweaking # timestamps and including generated filess as needed. # release-tarball: gpsbabel.html -# rm -fr /tmp/gpsbabel-$(VERSIOND) - cp -ap gpsbabel.html /tmp/gpsbabel-$(VERSIOND)/ - cd /tmp ; tar czf /tmp/gpsbabel-$(VERSIOND).tar.gz gpsbabel-$(VERSIOND) +# rm -fr gpsbabel-$(VERSIOND) + cp -ap gpsbabel.html gpsbabel-$(VERSIOND)/ + tar czf /tmp/gpsbabel-$(VERSIOND).tar.gz gpsbabel-$(VERSIOND) # cd /tmp ; tar xzf gpsbabel-$(VERSIOND).tar.gz # # The Windows executables are cross compiled from the exported CVS image. # Do the build of that here and make a zip file for distribution. +# Do this build in a temporary tree that was a copy of the tagged one +# to avoid scribbling in the "real" one. # release-winbuild: - cd /tmp/gpsbabel-$(VERSIOND) ; \ - LDFLAGS="-s" ./configure --target=i386-pc-mingw32 --with-cet=all && make mingw32-cross-build ; \ + rm -fr /tmp/gpsbabel-$(VERSIOND)-cross + cp -a gpsbabel-$(VERSIOND) /tmp/gpsbabel-$(VERSIOND)-cross + cd /tmp/gpsbabel-$(VERSIOND)-cross ; \ + LDFLAGS="-s" ./configure --target=i386-pc-mingw32 --with-cet=all --with-expathdr=mingw/include --with-libexpat=mingw/lib && make mingw32-cross-build && make \ + zip -j /tmp/gpsbabel-$(VERSIOND).zip $(WINFILES) release-upload: @@ -217,13 +222,6 @@ msvc-build: echo $(OBJS) > objs.lst LINK.EXE /NOLOGO @objs.lst ./msvc/expat/libexpat.lib /out:gpsbabel.exe -# under linux: ./configure --target=i386-pc-mingw32 && make mingw32-cross-build -mingw32-cross-build: - make \ - CC=i386-mingw32-gcc \ - EXEEXT=.exe \ - EXTRA_LDFLAGS="-Lmingw/lib -Imingw/include " - # Machine generated from here down. an1.o: an1.c defs.h config.h queue.h gbtypes.h cet.h cet_util.h inifile.h \ an1sym.h diff --git a/magproto.c b/magproto.c index 3cfdb0574..1be3c9196 100644 --- a/magproto.c +++ b/magproto.c @@ -467,12 +467,13 @@ retry: * Allow lazy allocation of track head. */ if (trk_head == NULL) { - trk_head = route_head_alloc(); /* These tracks don't have names, so derive one * from input filename. */ const char *s = strrchr(curfname, GB_PATHSEP); char *e; + + trk_head = route_head_alloc(); if (s) { s++; /* Skip path delim */ } else { -- 2.30.2